/**
  * Author: Mei
  * Date: 2020-12-09 15:25
  * Description: 
  * 一致性初始化
  */
#include <vector>
#include <iostream>
#include <bitset>
#include <algorithm>

using namespace std;

class complex {
private:
    double image;
    double real;
public:
    complex(double i, double r) : image(i), real(r) {
        cout << "complex(int, int)" << endl;
    }

    //complex(initializer_list<double> li) {
    //    cout << "complex(initizlizer_list<double>" << endl;
    //}

    void display() {
        cout << "image=" << this->image << ",real=" << this->real << endl;
    }
};

int main() {
    complex c(1.1, 1.2);
    complex c1{1.1, 1.2}; //如果没有init的构造函数 编译器会拆解参数
    complex c2{1.1, 1.2};
    complex c3 = {1.1, 1.2};


    return 0;
}